package com.test.mylotterysystem.comment.errorCode;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

@AllArgsConstructor
@NoArgsConstructor
public enum ServiceErrorCode implements ErrorCode {
    //  -----------------------  用户注册模块  -----------------------
    USER_INFO_IS_EMPTY(100,"用户注册信息为空"),
    USER_NAME_HAS_EXIST(101,"用户名已经存在"),
    MAIL_FORMAT_IS_ERROR(102,"邮箱格式错误"),
    MAIL_HAS_EXIST(103,"邮箱已经存在"),
    PHONE_FORMAT_IS_ERROR(104,"手机号格式错误"),
    PHONE_HAS_EXIST(105,"手机号已经存在"),
    PASSWORD_FORMAT_IS_ERROR(106,"密码格式错误"),
    USER_IDENTITY_IS_ERROR(107,"用户身份错误"),


    //  -----------------------  用户登录模块  -----------------------
    USER_LOGIN_INFO_IS_EMPTY(200,"用户登录信息为空"),
    USER_LOGIN_PARAM_TYPE_IS_ERROR(201,"用户登录类型有误"),
    USER_NOT_EXIST(202,"用户不存在"),
    USER_PASSWORD_IS_ERROR(203,"登录密码错误"),
    USER_IDENTITY_IS_NOT_ADMIN(204,"用户身份不为ADMIN"),
    USER_VERIFICATION_CODE_IS_ERROR(205,"验证码错误"),
    ;

    private Integer code;
    private String errorMsg;

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getErrorMsg() {
        return errorMsg;
    }
}
